# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License.  You may obtain a copy of the License at
#
#    http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Unspecified loggers and loggers with additivity=true output to server.log and stdout
# Note that INFO only applies to unspecified loggers, the log level of the child logger is used otherwise
log4j.rootLogger={{ log4j_rootlogger }}

log4j.appender.stdout={{ log4j_appender_stdout }}
log4j.appender.stdout.layout={{ log4j_appender_stdout_layout }}
log4j.appender.stdout.layout.ConversionPattern={{ log4j_appender_stdout_layout_conversionpattern }}

log4j.appender.kafkaAppender={{ log4j_appender_kafkaappender }}
log4j.appender.kafkaAppender.DatePattern={{ log4j_appender_kafkaappender_datepattern }}
log4j.appender.kafkaAppender.File={{ log4j_appender_kafkaappender_file }}
log4j.appender.kafkaAppender.layout={{ log4j_appender_kafkaappender_layout }}
log4j.appender.kafkaAppender.layout.ConversionPattern={{ log4j_appender_kafkaappender_layout_conversionpattern }}

log4j.appender.stateChangeAppender={{ log4j_appender_statechangeappender}}
log4j.appender.stateChangeAppender.DatePattern={{ log4j_appender_statechangeappender_datepattern }}
log4j.appender.stateChangeAppender.File={{ log4j_appender_statechangeappender_file }}
log4j.appender.stateChangeAppender.layout={{ log4j_appender_statechangeappender_layout }}
log4j.appender.stateChangeAppender.layout.ConversionPattern={{ log4j_appender_statechangeappender_layout_conversionpattern }}

log4j.appender.requestAppender={{ log4j_appender_requestappender }}
log4j.appender.requestAppender.DatePattern={{ log4j_appender_requestappender_datepattern }}
log4j.appender.requestAppender.File={{ log4j_appender_requestappender_file }}
log4j.appender.requestAppender.layout={{ log4j_appender_requestappender_layout }}
log4j.appender.requestAppender.layout.ConversionPattern={{ log4j_appender_requestappender_layout_conversionpattern }}

log4j.appender.cleanerAppender={{ log4j_appender_cleanerappender }}
log4j.appender.cleanerAppender.DatePattern={{ log4j_appender_cleanerappender_datepattern }}
log4j.appender.cleanerAppender.File={{ log4j_appender_cleanerappender_file }}
log4j.appender.cleanerAppender.layout={{ log4j_appender_cleanerappender_layout }}
log4j.appender.cleanerAppender.layout.ConversionPattern={{ log4j_appender_cleanerappender_layout_conversionpattern }}

log4j.appender.controllerAppender={{ log4j_appender_controllerappender }}
log4j.appender.controllerAppender.DatePattern={{ log4j_appender_controllerappender_datepattern }}
log4j.appender.controllerAppender.File={{ log4j_appender_controllerappender_file }}
log4j.appender.controllerAppender.layout={{ log4j_appender_controllerappender_layout }}
log4j.appender.controllerAppender.layout.ConversionPattern={{ log4j_appender_controllerappender_layout_conversionpattern }}

log4j.appender.authorizerAppender={{ log4j_appender_authorizerappender }}
log4j.appender.authorizerAppender.DatePattern={{ log4j_appender_authorizerappender_datepattern }}
log4j.appender.authorizerAppender.File={{ log4j_appender_authorizerappender_file }}
log4j.appender.authorizerAppender.layout={{ log4j_appender_authorizerappender_layout }}
log4j.appender.authorizerAppender.layout.ConversionPattern={{ log4j_appender_authorizerappender_layout_conversionpattern }}

# Change the line below to adjust ZK client logging
log4j.logger.org.apache.zookeeper={{ log4j_logger_org_apache_zookeeper }}

# Change the two lines below to adjust the general broker logging level (output to server.log and stdout)
log4j.logger.kafka={{ log4j_logger_kafka }}
log4j.logger.org.apache.kafka={{ log4j_logger_org_apache_kafka }}

# Change to DEBUG or TRACE to enable request logging
log4j.logger.kafka.request.logger={{ log4j_logger_kafka_request_logger }}
log4j.additivity.kafka.request.logger={{ log4j_additivity_kafka_request_logger }}

# Uncomment the lines below and change log4j.logger.kafka.network.RequestChannel$ to TRACE for additional output
# related to the handling of requests
#log4j.logger.kafka.network.Processor=false
#log4j.logger.kafka.server.KafkaApis=false
#log4j.additivity.kafka.server.KafkaApis=false
{% if log4j_logger_kafka_network_processor is defined %}
log4j.logger.kafka.network.Processor={{ log4j_logger_kafka_network_processor }}
{% endif %}
{% if log4j_logger_kafka_server_kafkaapis is defined %}
log4j.logger.kafka.server.KafkaApis={{ log4j_logger_kafka_server_kafkaapis }}
{% endif %}
{% if log4j_additivity_kafka_server_kafkaapis is defined %}
log4j.additivity.kafka.server.KafkaApis={{ log4j_additivity_kafka_server_kafkaapis }}
{% endif %}
log4j.logger.kafka.network.RequestChannel$={{ log4j_logger_kafka_network_requestchannel }}
log4j.additivity.kafka.network.RequestChannel$={{ log4j_additivity_kafka_network_requestchannel }}

log4j.logger.kafka.controller={{ log4j_logger_kafka_controller }}
log4j.additivity.kafka.controller={{ log4j_additivity_kafka_controller }}

log4j.logger.kafka.log.LogCleaner={{ log4j_logger_kafka_log_logcleaner }}
log4j.additivity.kafka.log.LogCleaner={{ log4j_additivity_kafka_log_logcleaner }}

log4j.logger.state.change.logger={{ log4j_logger_state_change_logger }}
log4j.additivity.state.change.logger={{ log4j_additivity_state_change_logger }}

# Access denials are logged at INFO level, change to DEBUG to also log allowed accesses
log4j.logger.kafka.authorizer.logger={{ log4j_logger_kafka_authorizer_logger }}
log4j.additivity.kafka.authorizer.logger={{ log4j_additivity_kafka_authorizer_logger }}
